<nz-layout class="home">
  <nz-header>
    <div>
      <div class="logo">
        <img src="assets/images/logo.png"/>
      </div>

      <div class="sysname">
        <h5 *ngIf="!showWz">苏州市电梯无纸化在线维保综合管理平台</h5>
        <h5 *ngIf="showWz">吴中区电梯智慧管理系统</h5>
        <!-- <a style="margin-left:10px;color:black" (click)="goHome()" >
          <i class="anticon anticon-home"></i>
          <h4 style="display: inline-block;">首页</h4>
        </a> -->
      </div>
      <!-- <input *ngIf="isAdmin"  class="dataupload" type="file" ng2FileSelect [uploader]="fileUploader" (change)="selectedFileOnChanged($event)"/> -->

      <div class="headRight">
        <div style="display: inline-block;cursor:pointer" (click)="add(title, content, footer)">
        <nz-badge [nzDot]="dot">
          <ng-template #content>

            <i class="anticon anticon-notification"></i> 消息</ng-template>
        </nz-badge></div>

        <a class="ant-dropdown-link" nz-dropdown>
          <i class="anticon anticon-user"></i>
          欢迎您：{{sysUser.userName || sysUser.userCode}}({{sysUser.roleName}})<i *ngIf="sysUser.userState==0"
                                                                               class="anticon anticon-close-circle-o"
                                                                               style="color:red; font-size: 10px;"></i>{{sysUser.partyName}}
          <span *ngIf="partyType != 4" style="margin-left:4px;color:#0010a8;">系统积分：</span>
          <span *ngIf="partyType != 4" style="color:red;">{{mark}}</span>
          <!-- <i class="anticon anticon-down"></i> -->
        </a>
        <nz-dropdown [nzPlacement]="'bottomRight'">

          <a class="ant-dropdown-link" nz-dropdown style="margin-left: 10px;">
            <i class="anticon anticon-setting"></i> 设置</a>
          <ul nz-menu>
            <li nz-menu-item (click)="showph(titleph, contentph, footerph)">
              <i class="anticon anticon-mobile"></i> 修改手机号
            </li>
            <li nz-menu-item (click)="showpwd(titlepass, contentpass, footerpass)">
              <i class="anticon anticon-compass"></i> 修改密码
            </li>
            <li *ngIf="this.sysUser.roleName != '监管系统管理员'&& this.sysUser.roleName != '使用系统管理员'
                    && this.sysUser.roleName != '维保系统管理员' && this.sysUser.roleName != '检验系统管理员'" nz-menu-item
                (click)="addMeatasisDialog(titleP, contentP, footerP)">
              <i class="anticon anticon-copy"></i> 用户转移
            </li>
            <li nz-menu-item (click)="extit()">
              <i class="anticon anticon-logout"></i> 退出
            </li>
          </ul>
        </nz-dropdown>
      </div>
    </div>
  </nz-header>

  <nz-layout>
    <!--<img src="http://localhost:8099/api/user/getUpload/哈哈.jpg">-->
    <nz-sider [nzWidth]="200" style="overflow-y: scroll;flex:0 0 200px;">

      <ul nz-menu [nzMode]="'inline'" style="background:rgb(33,44,48);color:rgb(160,181,192)" class="sideMenu">
        <li nz-menu-item routerLink="/home/main" class="ant-menu-item-selected">
          <span title>
            <i class="anticon anticon-home">
            </i> 主页
          </span>

        </li>
        <li *ngIf="(sysUser.partyType==4|| !sysUser.partyType) && sysUser.userState==1" nz-menu-item
            routerLink="/home/map-demo">
          <span title>
            <i class="anticon anticon-global">
            </i> 电梯分布图
          </span>
        </li>
        <ng-container *ngIf="sysUser.userState==1">
          <li nz-submenu [nzOpen]="false" *ngFor="let list of menuList" style="background:rgb(33,44,48);">
            <span [title]="list.authorName">
              <i class="anticon anticon-{{list.authorIcon}}">
              </i>  {{list.authorName}}
            </span>
            <ul *ngFor="let ll of list.childList" style="background:rgb(33,44,48);">
              <li nz-menu-item *ngIf="ll.childList.length==0" routerLink="{{ll.authorUrl}}" [title]="ll.authorName">
                <i class="anticon anticon-{{ll.authorIcon}}"></i>{{ll.authorName}}
              </li>
              <li nz-submenu *ngIf="ll.childList.length>0" [title]="ll.authorName">
                <span title>
                  <i class="anticon anticon-{{ll.authorIcon}}"></i>{{ll.authorName}}
                </span>
                <ul *ngFor="let lll of ll.childList">
                  <li *ngIf="lll.childList.length==0" nz-menu-item routerLink="{{lll.authorUrl}}"
                      [title]="ll.authorName" style="background:rgb(33,44,48);">
                    <i class="anticon anticon-{{lll.authorIcon}}"></i>{{lll.authorName}}
                  </li>
                  <li nz-submenu *ngIf="lll.childList.length>0" [title]="ll.authorName">
                    <span title>
                      <i class="anticon anticon-{{lll.authorIcon}}"></i>{{lll.authorName}}
                    </span>
                    <ul *ngFor="let llll of lll.childList">
                      <li *ngIf="llll.childList.length==0" nz-menu-item routerLink="{{llll.authorUrl}}"
                          [title]="ll.authorName " style="background:rgb(33,44,48);">
                        <i class="anticon anticon-{{llll.authorIcon}}"></i>{{llll.authorName}}
                      </li>
                      <li nz-submenu *ngIf="llll.childList.length>0" [title]="ll.authorName">
                        <span title>
                          <i class="anticon anticon-{{llll.authorIcon}}"></i>{{llll.authorName}}
                        </span>
                      </li>
                    </ul>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
        </ng-container>
      </ul>
    </nz-sider>
    <nz-layout>
      <nz-content>
        <router-outlet></router-outlet>
      </nz-content>
    </nz-layout>
  </nz-layout>
  <nz-footer class="footer" >copyright ©2019 苏州市市场监督管理局版权所有&nbsp;&nbsp;&nbsp;&nbsp;技术支持：江苏华阳特安检测科技有限公司</nz-footer>
</nz-layout>

<ng-template #titlepass>
  <span>修改密码</span>
</ng-template>
<ng-template #contentpass>
  <form nz-form>
    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="6" [nzXs]="6">
        <label nz-form-item-required for="oldpwd">旧密码</label>
      </div>
      <div nz-form-control nz-col [nzSm]="9" [nzXs]="9">
        <nz-input [nzType]="'password'" [(ngModel)]="oldpwd" name="oldpwd" [nzPlaceHolder]="'请输入旧密码'"></nz-input>
      </div>
    </div>

    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="6" [nzXs]="6">
        <label nz-form-item-required for="sendtitle">新密码</label>
      </div>
      <div nz-form-control nz-col [nzSm]="9" [nzXs]="9">
        <nz-input [nzType]="'password'" [(ngModel)]="newpwd" name="newpwd" [nzPlaceHolder]="'请输入新密码'"></nz-input>
      </div>
    </div>

    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="6" [nzXs]="6">
        <label nz-form-item-required for="newpwd2">再次输入</label>
      </div>
      <div nz-form-control nz-col [nzSm]="9" [nzXs]="9">
        <nz-input [nzType]="'password'" [(ngModel)]="newpwd2" name="newpwd2" [nzPlaceHolder]="'请再次输入'"></nz-input>
      </div>
    </div>

    <div nz-form-item nz-row style="margin-bottom:8px;">
      <div nz-form-control nz-col [nzSpan]="14" [nzOffset]="10">
        <button nz-button (click)="changePass()" [nzType]="'primary'">确定</button>
      </div>
    </div>
  </form>

</ng-template>
<ng-template #footerpass>
  <div>
  </div>
</ng-template>


<ng-template #titleP>
  <span>用户转移</span>
</ng-template>
<ng-template #contentP>
  <form nz-form>
    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSpan]="9">
        <label for="toParty">转移给</label>
      </div>
      <div nz-form-control nz-col [nzSpan]="8">
        <nz-select nzAllowClear name="toParty" [nzPlaceHolder]="'请选择单位'" [nzShowSearch]="true" [nzSize]="'large'"
                   [(ngModel)]="toParty">
          <nz-option *ngFor="let item of partySeleList" [nzLabel]="item.partyName" [nzValue]="item.id"></nz-option>
        </nz-select>

      </div>
    </div>
    <div nz-form-item nz-row style="margin-bottom:8px;">
      <div nz-form-control nz-col [nzSpan]="14" [nzOffset]="10">
        <button nz-button (click)="addMeatasis()" [nzSize]="'large'" [nzType]="'primary'">确定</button>
      </div>
    </div>

  </form>

</ng-template>
<ng-template #footerP>
  <div>
  </div>
</ng-template>


<ng-template #titleph>
  <span>修改手机号码</span>
</ng-template>
<ng-template #contentph>
  <form nz-form>
    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="6" [nzXs]="6">
        <label nz-form-item-required for="newphone">新手机号</label>
      </div>
      <div nz-form-control nz-col [nzSm]="9" [nzXs]="9">
        <nz-input [(ngModel)]="newphone" name="newphone" [nzPlaceHolder]="'请输入手机号'" ></nz-input>
      </div>
    </div>

    <div nz-form-item nz-row style="margin-bottom:8px;">
      <div nz-form-control nz-col [nzSpan]="14" [nzOffset]="10">
        <button nz-button (click)="changePhone()" [nzType]="'primary'">确定</button>
      </div>
    </div>
  </form>

</ng-template>
<ng-template #footerph>
  <div>
  </div>
</ng-template>

<!--添加界面-->
<ng-template #title>
  <span>{{modelTitle}}</span>
</ng-template>
<ng-template #content>
  <information-agent *ngIf="modal==0" [inValue]="this" (outPut)="addOutPut($event)"></information-agent>
</ng-template>
<ng-template #footer>
  <div>
  </div>
</ng-template>

